Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Format reportError log #110

Merged
merged 1 commit into from
Dec 19, 2024
Merged

chore: Format reportError log #110

merged 1 commit into from
Dec 19, 2024

Conversation

patriknw
Copy link
Member

No description provided.

val severityString = err.severity.name.take(1) + err.severity.name.drop(1).toLowerCase(Locale.ROOT)
val severityString = err.severity match {
case Level.ERROR => "Error"
case Level.WARN => "Warning"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warn => Warning was the reason I changed this, but seems better to do a full match than the letter conversions

val message = s"$severityString reported from Akka runtime: ${err.code} ${err.message}"
val detail = if (err.detail.isEmpty) Nil else List(err.detail)
val seeDocs = DocLinks.forErrorCode(err.code).map(link => s"See documentation: $link").toList
val messages = message :: detail ::: seeDocs
val logMessage = messages.mkString("\n\n")
val logMessage = messages.mkString("\n")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this extra newline is helpful. Looks like this:

07:29:10.966 INFO  akka.runtime.VersionCheck - A newer version of the SDK [3.0.2] is available. Your current version is [3.0.1-52-ded12af8-SNAPSHOT].
07:29:10.968 WARN  akka.javasdk.ServiceLog - Warn reported from Akka runtime: AK-00011 A newer version of the SDK [3.0.2] is available. Your current version is [3.0.1-52-ded12af8-SNAPSHOT].

To fix this issue, update the version of akka-javasdk in your Akka service. Then build and deploy a new version of it.
07:29:11.608 INFO  akka.runtime.DiscoveryManager - Building component [counter-command-from-topic]

@johanandren johanandren merged commit e27b102 into java-spi Dec 19, 2024
22 checks passed
@johanandren johanandren deleted the wip-log-patriknw branch December 19, 2024 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants